/**
 * @author xialeistudio
 * @date 2016/5/9 0009
 */
'use strict';
require('should');
describe('test shared-manager-redis', function() {
	this.timeout(3000);
	const redis = require('redis');
	const sharedManger = require('../shared-manager/redis');
	it('set value should return OK', (done)=> {
		sharedManger().setAsync('name', 'xialei').then((result)=> {
			result.should.be.equal('OK');
			done();
		}).catch(done);
	});
	it('name should equal to \'xialei\'', (done)=> {
		sharedManger().getAsync('name').then((result)=> {
			result.should.be.equal('xialei');
			done();
		}).catch(done);
	});
	it('delete key should return true', (done)=> {
		sharedManger().delAsync('name').then((result)=> {
			result.should.be.equal(1);
			done();
		}).catch(done);
	});
});